<!DOCTYPE html>
<html ng-app="adminApp">
<head>
<meta charset="utf-8">
<title>&{'app.title'}</title>
<link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/bootstrap.min.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/bootstrap-theme.min.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/font-awesome.min.css'}">
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/play-weixin-style.css'}">
</head>
<body ng-controller="adminCtrl">

<!-- menu -->
<div class="menu" ng-controller="menuCtrl">
	<h1>&{'app.brand'}</h1>
	<ul class="root" ng->
		<li ng-repeat="menu in menus" ng-class="active(menu)" ng-click="current(menu)"><a href="#">{{menu.name}}</a></li>
	</ul>
</div>
<!-- /menu -->

<!-- body -->
<div class="body">
	<div class="wrap">
		<!-- nav -->
		<div class="navbar navbar-default">
			<div class="container-fluid">
				<div class="navbar-header">
					<a href="#" class="navbar-brand">${weixin?.name}</a>
				</div>
				<div class="navbar-collapse">
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown">
								<b class="glyphicon glyphicon-user"></b>
								${user.nickname}
								<b class="caret"></b>
							</a>
							<ul class="dropdown-menu">
								<li><a href="#" ng-click="load('@{Admin.reset_password}')"><i class="fa fa-key fa-fw"></i>&{'admin.op.password'}</a></li>
								<li class="divider"></li>
								<li><a href="@{Admin.sign_out}"><i class="fa fa-sign-out fa-fw"></i>&{'admin.op.signout'}</a></li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!-- /nav -->
		
		<!-- content -->
		<div class="fade-animate" ng-include="menu.url"></div>
		<!-- /content -->
	</div>
</div>
<!-- /body -->

<script type="text/javascript" src="@{'/public/javascripts/jquery-2.1.1.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/bootstrap.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/angular.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/angular-animate.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/angular-sanitize.min.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/angular-ufrog-common.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/angular-ufrog-bootstrap.js'}"></script>
<script type="text/javascript" src="@{'/public/javascripts/play-weixin-console.js'}"></script>
<script type="text/javascript">
'use strict'
var menuCtrl = ['$scope', function($scope) {
	$scope.menus([
		{name: '&{'admin.nav.weixin'}', url: '@{Weixins.index}'},
		{name: '&{'admin.nav.user'}', url: '@{Users.index}'},
		{name: '&{'admin.nav.welcome'}', url: '@{Weixins.welcome}'},
		{name: '&{'admin.nav.reply'}', url: '@{Weixins.reply}'},
		{name: '&{'admin.nav.resource'}', url: '@{Resources.index}'},
		{name: '&{'admin.nav.menu'}', url: '@{Weixins.menu}'}
	]);
}];
</script>

</body>
</html>
